package com.xc.jiguang.utils;


import com.xc.jiguang.vo.ResultVO;

/**
 * @program: uushop01
 * @author: Yuhe
 * @create: 2022-10-26 09:40
 * @description: 返回结果工具类（失败 / 成功）
 */

public class ResultVOUtil {

    public static ResultVO success(Object data){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        resultVO.setData(data);
        return resultVO;
    }

    public static ResultVO fail(String msg){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(-1);
        resultVO.setMsg(msg);
        return resultVO;
    }
}
